package com.codingman.springdemo2;

public class Demo0 {

	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
		Book book1 = new Book();
		book1.setName("AAA");
		System.out.println(book1.getName());
		
		Book book2 = Book.getBook();
		book2.setName("BBB");
		System.out.println(book2.getName());
		
		Class clz = Class.forName("com.codingman.springdemo2.Book");
		Book book3 = (Book) clz.newInstance();
		book3.setName("CCC");
		System.out.println(book3.getName());
	}

}
